#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;
const int N = 21;
struct Node
{
    int a, b, c;
}q[N * N * N];
int hh = 0, tt = 0;
int A, B, C;
bool st[N][N][N];
void insert(int a, int b, int c)
{
    if (!st[a][b][c])
    {
        q[++tt] = { a,b,c };
        st[a][b][c] = true;
    }
}
void bfs()
{
    q[0] = { 0,0,C };
    st[0][0][C] = true;
    while (hh <= tt)
    {
        auto t = q[hh++];
        int a = t.a, b = t.b, c = t.c;
        insert(a - min(a, B - b), min(B, a + b), c);
        insert(a - min(a, C - c), b, min(C, a + c));
        insert(min(A, a + b), b - min(b, A - a), c);
        insert(a, b - min(b, C - c), min(C, b + c));
        insert(min(A, a + c), b, c - min(c, A - a));
        insert(a, min(B, b + c), c - min(c, B - b));
    }
}
int main()
{
    cin >> A >> B >> C;
    bfs();
    for (int c = 0; c <= C; c++)
    {
        for (int b = 0; b <= B; b++)
        {
            if (st[0][b][c]) cout << c << " ";
        }
    }
    return 0;
}